window.onload = function(){
	
	
	var info_chk_all = document.getElementById("info_chk_all");
	var btn_del = document.getElementById("btn_del");
	info_chk_all.addEventListener("change", check_all, false);
	btn_del.addEventListener("click", batchDel, false);
	var chks = document.all("info_chk");
	function check_all() {
		
		for(var i=0;i<chks.length;i++) {
			
			chks[i].checked = this.checked;
		}
		
	}
	
	function batchDel() {
		
		var idsStr = "";
		for(var i=0;i<chks.length;i++) {
			
			if(chks[i].checked) {
					idsStr+=chks[i].value + ",";
			}
			
		}
		if(idsStr != "") {
			idsStr = idsStr.substr(0, idsStr.length-1);
			window.location= "memberbatchdel_do.jsp?ids=" + idsStr;
		}else{
			alert("没有选中任何要删除的数据!");
		}
		
		
	}
	
	
}
